package com.mattgarner.jaddas.cli;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ConsoleManager implements Runnable {
	private InputStreamReader inputStream;
	private BufferedReader iBufferedReader;
	
	public ConsoleManager() {
		
	}
	
	public void run() {
	    inputStream = new InputStreamReader(System.in);
	    iBufferedReader = new BufferedReader(inputStream);
	    CommandParser parser = new CommandParser();
	    System.out.print( "cli> " );
	    try {
	    	while(true) {
	    		parser.parseConsoleInput(iBufferedReader.readLine());
	    	}
	    } catch (IOException e) {
	    	System.out.println("Error reading console.");
	    }
	}
}
